import { UseDisconnectWalletExample } from '../../../examples/wallet-hooks';

# useDisconnectWallet

The `useDisconnectWallet` hook is a mutation hook for disconnecting from an active wallet
connection, if currently connected.

```ts
import { ConnectButton, useDisconnectWallet } from '@mysten/dapp-kit';

function MyComponent() {
	const { mutate: disconnect } = useDisconnectWallet();
	return (
		<div>
			<ConnectButton />

			<button onClick={() => disconnect()}>Disconnect</button>
		</div>
	);
}
```

## Example

<UseDisconnectWalletExample />

## Arguments

There are no arguments for `useConnectWallet`.
